package com.sand.feign;

import com.sand.dto.Select.UserSelect;
import com.sand.entity.user.User;
import com.sand.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("juao-user")
public interface UserFeign {

    /**
     * 查询单个用户
     * @param userSelect
     * @return
     */
    @PostMapping("/user/select")
    ResponseResult<User> inquire(@RequestBody UserSelect userSelect);


    /**
     * 根据多个id返回多个用户基本数据
     * @param ids
     * @return
     */
    @PostMapping("/user/ids")
    ResponseResult<List<User>> ids(@RequestBody Integer[] ids);


    //根据id查询用户
    @PostMapping("/user/getById")
    ResponseResult<User> getById(@RequestBody Integer userId);

}
